﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Parser;

namespace Service
{
    [ServiceContract]
    public interface IStatisticsService
    {
        [OperationContract]
        void Init();

        [OperationContract]
        void AddVisitor(int siteId,
            string visitorIp,
            DateTime firstAction,
            DateTime lastAction,
            int totalAction,
            long siteEntryId,
            string referer,
            string os,
            string webbrowser,
            string webbrowserVersion,
            long trafficSent,
            long trafficGet,
            int siteVisits,
            int visitorType);

        [OperationContract]
        void AddPage(int siteId, string url);

        [OperationContract]
        void AddLogFile(Shared.Logfile logfile);

        [OperationContract]
        long GetPage(int siteId, string url);

        [OperationContract]
        Shared.Site GetSite(int siteId);

        [OperationContract]
        Shared.Logfile GetLogFile(int siteId, string logFile);

        [OperationContract]
        void UpdateLogFile(Shared.Logfile logfile);
    }
}
